package com.star.message.api.service;

import com.star.message.api.contract.command.SendEmailCommand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 邮件三方api
 *
 * @author zhouhengzhe
 * @version 1.0
 * @date 2023/11/28 18:05
 */
@FeignClient(name = "message-service", contextId = "MessageEmailApi", path = "/message/email")
public interface MessageEmailApi {

    /**
     * 发送邮件
     *
     * @param sendEmailCommand 邮件信息
     */
    @PostMapping("/sendEmail")
    void sendEmail(@RequestBody @Validated SendEmailCommand sendEmailCommand);
}
